﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WinAlarmManage.Models
{
    public  class AlarmLogInfo
    {

        public int Id { get; set; }
        public DateTime AlarmTime { get; set; }
        public string ParaName { get; set; }
        /// <summary>
        /// 低 or 高值报警
        /// </summary>
        public int AlarmType { get; set; }
        public string AlarmState { get; set; }
        public int Value { get; set; }
        public int AlarmNote { get; set; }

        public AlarmLogInfo(int id, DateTime alarmTime, string paraName, int alarmType, string alarmState, int value, int alarmNote)
        {
            Id = id;
            AlarmTime = alarmTime;
            ParaName = paraName ?? throw new ArgumentNullException(nameof(paraName));
            AlarmType = alarmType;
            AlarmState = alarmState ?? throw new ArgumentNullException(nameof(alarmState));
            Value = value;
            AlarmNote = alarmNote;
        }
    }
}
